package com.cyj.dream.gateway.config;

import com.cyj.dream.gateway.filter.PasswordDecoderFilter;
import com.cyj.dream.gateway.filter.ValidateCodeGatewayFilter;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.List;

/**
 * @Description: 网关配置文件
 * @BelongsProject: DreamChardonnay
 * @BelongsPackage: com.cyj.dream.gateway.config
 * @Author: ChenYongJia
 * @CreateTime: 2021-09-27 12:44
 * @Email: chen87647213@163.com
 * @Version: 1.0
 */
@Data
@RefreshScope
@ConfigurationProperties("gateway")
public class GatewayConfigProperties {

    /**
     * 网关解密登录后端公钥 秘钥 {@link PasswordDecoderFilter}
     */
    public String publicKey;

    /**
     * 网关解密登录前端密码 秘钥 {@link PasswordDecoderFilter}
     */
    public String encodeKey;

    /**
     * 网关不需要校验验证码的客户端 {@link ValidateCodeGatewayFilter}
     */
    public List<String> ignoreClients;

    /**
     * 权限放行的地址
     */
    private List<String> allowPaths;

}
